home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15554 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.mindlink.net!news
  2. From: Blake Kadatz <blake_kadatz@mindlink.bc.ca>
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++
  4. Subject: Re: Linked Lists
  5. Date: Sat, 06 Apr 1996 06:08:08 -0800
  6. Organization: BitMotion Software Inc.
  7. Message-ID: <31667AC8.4EE2@mindlink.bc.ca>
  8. References: <4k2kom$k5r@news2.cts.com>
  9. NNTP-Posting-Host: line019.nwm.mindlink.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. John Lutz wrote:
  16. >   I would like to store all the objects in a linked list for a given window. I
  17. > would like for the linked list to handle the dynamic allocation of these
  18. > object and return the pointer to the subclass that is allocating the objects
  19. > on the linked list. I would like for the linked list class to delete all
  20. > objects dynamically.
  21.  
  22. Have you tried CObList or CPtrList?  These classes don't automatically 
  23. delete the object for you, but when you remove the object from the list, 
  24. it returns you a pointer.  Easy -- just delete that pointer.
  25.  
  26. --
  27. --------------------------------------------------------------------
  28. Blake Kadatz                    phone: 604-420-3931
  29. BitMotion Software Inc.         fax:   604-420-3921
  30. 304 - 7321 Halifax Street       mailto:blake_kadatz@mindlink.bc.ca
  31. Burnaby, B.C., Canada V5A 4R5
  32.